import React from 'react';
import logo from './logo.svg';
import AppHeader from './Layout/AppHeader'
import './App.css';
import { Provider } from "react-redux"
import store from './store'
import AppContent from './Layout/AppContent';

// import {Route, BrowserRouter as Router, Routes, Navigate} from 'react-router-dom'
import {Route, HashRouter as Router, Routes, Navigate} from 'react-router-dom'

import Login from './pages/user/Login';
import WorkPage from './Layout/WorkPage';

import 'moment/locale/zh-cn';
import 'antd/dist/antd.css';

function App() {
  return (
    <Provider store={store}>
      <Router>
        <div className="App">
          <AppHeader />
          <AppContent>
            <Routes>
              <Route index element={<Navigate to="/login" />} />
              <Route path="/logo" element={<div>1010</div>} />
              <Route path="/login" element={<Login />} />
              <Route path="/work/*" element={<WorkPage />} />
              <Route path="*" element={<Navigate to="/login"/>} />
            </Routes>
          </AppContent>
        </div>
      </Router>
    </Provider>
  );
}

export default App;
